<?php

namespace App\Http\Controllers\Admin;

use Illuminate\Http\Request;
use App\Repositories\DepartmentRepository;
use App\Repositories\RegionRepository;
use App\Repositories\OrderRepository;
use App\Repositories\UserRepository;
use App\Repositories\CustomerRepository;

class TongjiController extends AdminController
{
    public function __construct(
        DepartmentRepository $department, 
        RegionRepository $region,
        OrderRepository $order,
        UserRepository $user,
        CustomerRepository $customer

    )
    {
        $this->department = $department;
        $this->region = $region;
        $this->order = $order;
        $this->user = $user;
        $this->customer = $customer;
    }

    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function getIndex()
    {
        $user_counts = $this->user->getCountsGroup();

        return view('admin.tongji', compact('user_counts'));
    }
}
